package com.lcx.server.utils;

import com.lcx.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * 获取当前登陆操作员
 * @author Logan
 * @create 2021-12-1120:24
 */
public class AdminUtils {

    public static Admin getCurrentAdmin(){
        return ((Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }
}
